home *** CD-ROM | disk | FTP | other *** search
- /* SymbolTableEntry.h */
-
- #ifndef Included_SymbolTableEntry_h
- #define Included_SymbolTableEntry_h
-
- /* SymbolTableEntry module depends on */
- /* MiscInfo.h */
- /* Audit */
- /* Debug */
- /* Definitions */
- /* CRC32 */
- /* TrashTracker */
- /* Memory */
- /* PcodeObject */
- /* SymbolList */
-
- #include "PcodeObject.h"
-
- struct SymbolRec;
- typedef struct SymbolRec SymbolRec;
-
- /* forwards */
- struct TrashTrackRec;
- struct SymbolListRec;
-
- typedef enum
- {
- eSymbolUndefined EXECUTE(= -2351),
- eSymbolVariable,
- eSymbolFunction
- } SymbolType;
-
- /* this package allocates all data with TrashTracker */
-
- /* create a new symbol table entry for a variable */
- SymbolRec* NewSymbol(struct TrashTrackRec* Trash, char* String, long StringLength);
-
- /* find out what the symbol is a symbol of */
- SymbolType WhatIsThisSymbol(SymbolRec* Symbol);
-
- /* get the hash value for the string */
- unsigned long GetSymbolHashValue(SymbolRec* Symbol);
-
- /* get a pointer to the actual string name of the variable */
- char* GetSymbolName(SymbolRec* Symbol);
-
- /* make symbol into a variable symbol */
- void SymbolBecomeVariable(SymbolRec* Symbol, DataTypes VarType);
-
- /* get the object type for the variable */
- DataTypes GetSymbolVariableDataType(SymbolRec* Symbol);
-
- /* make variable know where on the stack it lives. must be a positive number */
- void SetSymbolVariableStackLocation(SymbolRec* Symbol, long StackLoc);
-
- /* find out where on the stack a variable lives. */
- long GetSymbolVariableStackLocation(SymbolRec* Symbol);
-
- /* make symbol into a function symbol */
- void SymbolBecomeFunction(SymbolRec* Symbol, struct SymbolListRec* ArgList,
- DataTypes ReturnType);
-
- /* get the return type for the function */
- DataTypes GetSymbolFunctionReturnType(SymbolRec* Symbol);
-
- /* get the list of symbol table entries from a function call argument list */
- struct SymbolListRec* GetSymbolFunctionArgList(SymbolRec* Symbol);
-
- /* perform a hash on a name */
- unsigned long UseSymbolTableHash(char* String, long Length);
-
- #endif
-